package com.alumni_circle;

import com.alumni_circle.core.config.RedisCache;
import com.alumni_circle.core.junit.BaseJunit;
import com.alumni_circle.core.service.rbac.impl.AuthorityServiceImpl;
import com.alumni_circle.core.service.rbac.impl.RoleAuthorityServiceImpl;
import com.alumni_circle.core.service.rbac.impl.RoleServiceImpl;
import com.alumni_circle.core.service.rbac.impl.UserRoleServiceImpl;
import org.junit.Test;

import javax.annotation.Resource;
import java.util.HashSet;
import java.util.Set;

/**
 * @author 龙小虬
 * @since 2020-07-08 01:29
 */
public class JunitTest extends BaseJunit {

    @Resource
    AuthorityServiceImpl authorityService;

    @Resource
    UserRoleServiceImpl userRoleService;

    @Resource
    RoleAuthorityServiceImpl roleAuthorityService;

    @Resource
    RoleServiceImpl roleService;

    @Resource
    RedisCache redisCache;

    @Test
    public void test() throws Exception{
        Set<String> set= new HashSet<>();
        set.add("servermanagement");
        set.add("servermanagement_accesslog");
        set.add("rolemanagement");
        set.add("rolemanagement_userrole");
        set.add("rolemanagement_role");
        set.add("usermanagement");
        set.add("usermanagement_userinfo");
        set.add("usermanagement_authentication");
        set.add("permissionmanagement");
        set.add("permissionmanagement_permissions");
        set.add("permissionmanagement_rolePermissions");
        set.add("infomanagement_announcement");
        set.add("workplace");
        set.add("infomanagement");
        set.add("infomanagement_invitation");
        set.add("infomanagement_privateInvitation");
        set.add("infomanagement_feedback");
        set.add("infomanagement_slideshow");
        set.add("user");
        set.add("user_password");
        set.add("user_user");
        redisCache.setCacheSet("ROLE_ADMIN(permission)",set);
        System.out.println(set.toString());
    }

}
